package ihis.model;

import java.io.Serializable;
import java.util.Date;

/**
 * 기간에 따라 수행/완료 개수 등의 진행 현황 정보
 * @author yoni230
 *
 */
public class Schedule  implements Serializable{
	private static final long serialVersionUID = -6720346486895865427L;

	/** 팀 | 개인 */
	private int ownerType;

	/** 팀(팀ID) | 개인(사용자ID) */
	private String ownerId;
	/** 프로젝트 ID */
	private String projectId;
	/** 기간의 종류 : 주, 월, 년 */
	private int periodType;
	/** 보고 일자 : startDate에서 reportDate로 이름 변경(명확하게...) */
	private Date reportDate;
	/** 진행 개수 */
	private int inProgressCnt;
	/** 완료 개수 */
	private int completedCnt;
	/** 지연 개수 */
	private int delayedCnt;
	/** 차주 진행 예정 개수 */
	private int plannedCnt;
	/** 팀 아이디 */
	private String teamId;
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(ownerId).append(" ").append(projectId).append(" ").append(periodType).append(" ")
			.append(reportDate).append(" ").append(inProgressCnt).append(" ").append(completedCnt).append(" ")
			.append(delayedCnt).append(" ").append(plannedCnt);
		return sb.toString();
	}
	
	public int getInProgressCnt() {
		return inProgressCnt;
	}
	public void setInProgressCnt(int inProgressCnt) {
		this.inProgressCnt = inProgressCnt;
	}
	public int getCompletedCnt() {
		return completedCnt;
	}
	public void setCompletedCnt(int completedCnt) {
		this.completedCnt = completedCnt;
	}
	public int getDelayedCnt() {
		return delayedCnt;
	}
	public void setDelayedCnt(int delayedCnt) {
		this.delayedCnt = delayedCnt;
	}
	public int getPlannedCnt() {
		return plannedCnt;
	}
	public void setPlannedCnt(int plannedCnt) {
		this.plannedCnt = plannedCnt;
	}
	/**
	 * @return the ownerType
	 */
	public int getOwnerType() {
		return ownerType;
	}
	/**
	 * @param ownerType the ownerType to set
	 */
	public void setOwnerType(int ownerType) {
		this.ownerType = ownerType;
	}
	/**
	 * @return the projectId
	 */
	public String getProjectId() {
		return projectId;
	}
	/**
	 * @param projectId the projectId to set
	 */
	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}
	/**
	 * @return the periodType
	 */
	public int getPeriodType() {
		return periodType;
	}
	/**
	 * @param periodType the periodType to set
	 */
	public void setPeriodType(int periodType) {
		this.periodType = periodType;
	}
	/**
	 * @return the reportDate
	 */
	public Date getReportDate() {
		return reportDate;
	}
	/**
	 * @param reportDate the reportDate to set
	 */
	public void setReportDate(Date reportDate) {
		this.reportDate = reportDate;
	}
	/**
	 * @return the ownerId
	 */
	public String getOwnerId() {
		return ownerId;
	}
	/**
	 * @param ownerId the ownerId to set
	 */
	public void setOwnerId(String ownerId) {
		this.ownerId = ownerId;
	}
	
	public boolean isEmpty()
	{
		if(inProgressCnt+completedCnt+delayedCnt+plannedCnt == 0)
			return true;
		else 
			return false;
	}

	/**
	 * @return the teamId
	 */
	public String getTeamId() {
		return teamId;
	}

	/**
	 * @param teamId the teamId to set
	 */
	public void setTeamId(String teamId) {
		this.teamId = teamId;
	}	
}
